﻿
Partial Class _Default
    Inherits Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

        'TextBox1.Text = Context.User.Identity.Name
        'If ChkProgramRight(TextBox1.Text) Then
        '    ShowMessage("有權限")
        'Else
        '    ShowMessage("無權限")
        'End If
        ' Response.Redirect("~/WebForm/Main/MainPage.aspx")
        TextBox3.Text = TextBox1.Text
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            'TextBox1.Text = Context.User.Identity.Name
            '    TextBox2.Text = BaseUrl
            '    TextBox3.Text = FullBaseUrl
            '    TextBox4.Text = FullBaseUrlPathAndQuery
   
            BasePage.RunClientScriptForAjax(Me, "window.parent.parent.top.location='" + ResolveUrl("~/WebForm/Main/MainPage.aspx") + "'")

            '    Response.Redirect("~/WebForm/Main/MainPage.aspx")


        End If
    End Sub

    Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox3.Text = TextBox1.Text
        'Session("UID") = "AA"
        'Session("dbName") = "telecom"
        'Session("UserName") = "王金水"
        'Session("ActualUID") = "AA"
        'Session("ActualUserName") = "王金水"
        'Session("GlobalLanguage") = "zh-cn"
        'ReadRights(UID, Me.AppRelativeVirtualPath.ToString())
        'Response.Redirect("~/WebForm/Main/MainPage.aspx")

    End Sub

    Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click
        Response.Redirect("~/login.aspx")
    End Sub

    Protected Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.Click

        'Try
        '    OOoTools.ConnectOpenOffice()
        '    ' Server.CreateObject("com.sun.star.ServiceManager")
        '    ''  HelloWorldExample()
        '    Dim path = Now.ToString("yyyyMMddHHmmssffff") + ".ods"
        '    OOo_Examples.CalcSortingExample(Server.MapPath("~/public/" + path))

        '    Response.Redirect("~/public/" + path)

        'Catch ex As Exception
        '    OOoTools.DisconnectOpenOffice()
        'End Try

    End Sub

   
End Class
